package neuralmusic.brain.module;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Random;

import neuralmusic.brain.gui.Displayable;


/**
 * 
 * Concrete implementation of a Module
 * 
 * @author pjl
 *
 */
public class BasicModule implements Module {
	
	public List<Neuron> neurons = new ArrayList<Neuron>();
	Random rand = new Random();
	String name;
	
	public List<Connection> inputs;
	public List<Connection> outputs; 

	public BasicModule(String name){
		this.name=name;
	}
	

	public List<Connection> getInputs() {
		return inputs;
	}
	

	public List<Connection> getOutputs() {
		return outputs;
	}

	public List<Neuron> getNeurons() {
		return neurons;
	}

	@Override
	public String getName() {
		return name;
	}


	/**
	 * Set the sceduler for all the neurons in the module.
	 * @param sched
	 */
	@Override
	public void setScheduler(Scheduler sched) {
		
		for (Neuron n:neurons){
			n.setScheduler(sched);
		}
		
	}

}
